<?include_once('conn.php');?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<? include_once('inc_head.php'); ?>
<?
if($_GET['act']=='edit'){

	$mf=fopen('inc_config.php','w');

	fwrite($mf,"<?\r\n");

	$editor=$_POST['editor'];
	fwrite($mf,"\$editor='$editor';//编辑器选择\r\n");

	$editor_width=$_POST['editor_width'];
	fwrite($mf,"\$editor_width=$editor_width;//编辑器宽度\r\n");
	
	$editor_height=$_POST['editor_height'];
	fwrite($mf,"\$editor_height=$editor_height;//编辑器高度\r\n");
	
	$js_backtime=$_POST['js_backtime'];
	fwrite($mf,"\$js_backtime=$js_backtime;//JS自动跳转时间\r\n");
	
	
	$news_pagesize=$_POST['news_pagesize'];
	fwrite($mf,"\$news_pagesize=$news_pagesize;//资讯每页显示数量\r\n");

	
	
	fwrite($mf,"?>");
	fclose($mf);
	gourl('配置修改完成','admin_config.php');
	exit;
}
?>
<script>
		$(function(){
			$('#edit_chose').change(function(){
				$('#edit_chose_ok').val($(this).val());
			});	
		});
</script>
</head>
</head>
<body >
	<?local("后台参数配置");?>
<div id="intro"> 

<form name="form1" id="form1" method="post" action="?act=edit">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"  class="table_form">
	<tr>
		<td width="180"   align="right">编辑器显示宽高<br>可能有的无效</td>
		<td width="" colspan="3" > 
		<input  name="editor_width" type="number" class=":required :number form-control input-md" id="editor_width" value="<?echo $editor_width;?>" size="5" maxlength="5">
		<input  name="editor_height" type="number" class=":required :number form-control input-md" id="editor_height" value="<?echo $editor_height;?>" size="5" maxlength="5"> 
		</td>
	</tr>
	<tr>
		<td   align="right">当前使用的编辑器</td>
		<td  colspan="3" > 
		<input type="text" name="editor" id="edit_chose_ok" class=":required form-control input-md" value="<? echo $editor;?>" size=20 readonly>
		</td>
	</tr>
	<tr > 
		<td    align="right">修改编辑器</td>
		<td colspan="3" > 
			<select name="editor_select" id="edit_chose" class="">
				<option value='<? echo $editor;?>' >不改变</option>
				<option value='xheditor' >xheditor：字体标签不重复</option>
				<option value='fckeditor' >fckeditor：字体标签会生成多次，不好用</option>
				<option value='tqeditor' >tqeditor： 用font标签</option>
				<option value='kindeditor' >kindeditor：用span,标签不重复，可批量上传图片,图片按日期</option>
				<option value='ueditor' >百度编辑器136gbk：不能出现2个实例</option>
				<option value='ueditor136utf8' >百度编辑器136utf8</option>
				<option value='ueditor143utf8' >百度编辑器143utf8：上传路径/uploads/ueditor/</option>

			</select>
			<div>注意：用不同的编辑器所生成的标签的样式，比如颜色，字体，在修改的时候，如果换成了别的编辑器，可能会出错</div>
			<div>xheditor：在本地测试不知为什么不能拖动多张图片上传，只能一张,图片路径已改为绝对，文件可按日期目录存放</div>
			<div>fckeditor：不要用这个编辑器来上传图片，插入有时会变成0像素大小，要改，可以手动保存远程图片，按日期存放</div>
			<div>
			百度编辑器：粘贴后自动保存远程图片[已关]未改路径，批量上传图片已被vbyzc改为完美根目录下uploads/ueditor,自动按[年月日]文件夹存放，
			<span  style='color:red'>但是页面上不能出现2个实例，会只提交1个实例中的内容</span>
			</div>
			<div>kindeditor：图片上传目录已改为/uploads/kindeditor，得到图片路径为绝对，改为按[年月]文件夹保存图片</div>

		</td>
	</tr>

	<tr > 
		<td   align="right">处理页面自动跳转秒数 </td>
		<td colspan="3" >
		<input  name="js_backtime" type="number" class=":required :number form-control input-md" id="js_backtime" value="<?echo $js_backtime;?>" size="5" maxlength="5"></td>
	</tr>

	

	
	<tr > 
		<td   align="right">列表每页显示数量<div style="color:blue"></div>  </td>
		<td colspan="3" >
		<input  name="news_pagesize" type="number" class=":required :number form-control input-md" id="news_pagesize" value="<?echo $news_pagesize;?>" size="5" maxlength="5"></td>
	</tr>
	

	<tr>
		<td   align="right"> </td>
		<td >
		<button type="submit" class="btn btn-primary">保存</button>
		<button type="reset" class="btn">重置</button>
		</td>
	</tr>

</table>
</form>
	
</div>
<?include('inc_foot.php');?>
</body>
</html>